<?php
class ORMpz_ecom_order {
  public function toObj($args) {
    $obj = new stdClass();
    if (isset($args->track_id)) {
      $obj->track_id =  $args->track_id;
    }
    if (isset($args->date_added)) {
      $obj->date_added =  $args->date_added;
    }
    if (isset($args->date_last_mod)) {
      $obj->date_last_mod =  $args->date_last_mod;
    }
    if (isset($args->customer_id)) {
      $obj->customer_id =  $args->customer_id;
    }
    if (isset($args->order_no)) {
      $obj->order_no =  $args->order_no;
    }
    if (isset($args->is_paid)) {
      $obj->is_paid =  $args->is_paid;
    }
    if (isset($args->is_shipped)) {
      $obj->is_shipped =  $args->is_shipped;
    }
    if (isset($args->total)) {
      $obj->total =  $args->total;
    }
    if (isset($args->ip)) {
      $obj->ip =  $args->ip;
    }
    if (isset($args->cc_email)) {
      $obj->cc_email =  $args->cc_email;
    }
    if (isset($args->comment)) {
      $obj->comment =  $args->comment;
    }
    if (isset($args->payment_id)) {
      $obj->payment_id =  $args->payment_id;
    }
    if (isset($args->payment_name)) {
      $obj->payment_name =  $args->payment_name;
    }
    if (isset($args->transaction_id)) {
      $obj->transaction_id =  $args->transaction_id;
    }
    if (isset($args->parcel_id)) {
      $obj->parcel_id =  $args->parcel_id;
    }
    if (isset($args->ship_id)) {
      $obj->ship_id =  $args->ship_id;
    }
    if (isset($args->ship_name)) {
      $obj->ship_name =  $args->ship_name;
    }
    if (isset($args->ship_total)) {
      $obj->ship_total =  $args->ship_total;
    }
    if (isset($args->addr_id)) {
      $obj->addr_id =  $args->addr_id;
    }
    if (isset($args->addr_name)) {
      $obj->addr_name =  $args->addr_name;
    }
    if (isset($args->addr_tel)) {
      $obj->addr_tel =  $args->addr_tel;
    }
    if (isset($args->addr_mob)) {
      $obj->addr_mob =  $args->addr_mob;
    }
    if (isset($args->addr_address)) {
      $obj->addr_address =  $args->addr_address;
    }
    if (isset($args->addr_suburb)) {
      $obj->addr_suburb =  $args->addr_suburb;
    }
    if (isset($args->addr_city)) {
      $obj->addr_city =  $args->addr_city;
    }
    if (isset($args->addr_state)) {
      $obj->addr_state =  $args->addr_state;
    }
    if (isset($args->addr_country)) {
      $obj->addr_country =  $args->addr_country;
    }
    if (isset($args->addr_zip)) {
      $obj->addr_zip =  $args->addr_zip;
    }
    return $obj;
  }
}
?>
